<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<title>User authorization | ElasticSearch 7.7 权威指南中文版</title>
	<meta name="keywords" content="ElasticSearch 权威指南中文版, elasticsearch 7, es7, 实时数据分析，实时数据检索" />
    <meta name="description" content="ElasticSearch 权威指南中文版, elasticsearch 7, es7, 实时数据分析，实时数据检索" />
    <!-- Give IE8 a fighting chance -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
	<link rel="stylesheet" type="text/css" href="../static/styles.css" />
	<script>
	var _link = 'authorization.html';
    </script>
</head>
<body>
<div class="main-container">
    <section id="content">
        <div class="content-wrapper">
            <section id="guide" lang="zh_cn">
                <div class="container">
                    <div class="row">
                        <div class="col-xs-12 col-sm-8 col-md-8 guide-section">
                            <div style="color:gray; word-break: break-all; font-size:12px;">原英文版地址: <a href="https://www.elastic.co/guide/en/elasticsearch/reference/7.7/authorization.html" rel="nofollow" target="_blank">https://www.elastic.co/guide/en/elasticsearch/reference/7.7/authorization.html</a>, 原文档版权归 www.elastic.co 所有<br/>本地英文版地址: <a href="../en/authorization.html" rel="nofollow" target="_blank">../en/authorization.html</a></div>
                        <!-- start body -->
                  <div class="page_header">
<strong>重要</strong>: 此版本不会发布额外的bug修复或文档更新。最新信息请参考 <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html" rel="nofollow">当前版本文档</a>。
</div>
<div id="content">
<div class="breadcrumbs">
<span class="breadcrumb-link"><a href="index.html">Elasticsearch Guide [7.7]</a></span>
»
<span class="breadcrumb-link"><a href="secure-cluster.html">Secure a cluster</a></span>
»
<span class="breadcrumb-node">User authorization</span>
</div>
<div class="navheader">
<span class="prev">
<a href="oidc-without-kibana.html">« OpenID Connect without Kibana</a>
</span>
<span class="next">
<a href="built-in-roles.html">Built-in roles »</a>
</span>
</div>
<div class="chapter xpack">
<div class="titlepage"><div><div>
<h2 class="title">
<a id="authorization"></a>User authorization<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/x-pack/docs/en/security/authorization/overview.asciidoc">edit</a><a class="xpack_tag" href="https://www.elastic.co/subscriptions"></a>
</h2>
</div></div></div>
<p>The Elastic Stack security features add <em>authorization</em>, which is the process of determining whether the user behind an incoming request is allowed to execute
the request.</p>
<p>This process takes place after the user is successfully identified and
<a class="xref" href="setting-up-authentication.html" title="User authentication">authenticated</a>.</p>
<h3>
<a id="roles"></a>Role-based access control<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/x-pack/docs/en/security/authorization/overview.asciidoc">edit</a>
</h3>
<p>The security features provide a role-based access control (RBAC) mechanism,
which enables you to authorize users by assigning privileges to roles and
assigning roles to users or groups.</p>
<div class="imageblock">
<div class="content">
<img src="../static/security/authorization/images/authorization.png" alt="This image illustrates role-based access control">
</div>
</div>
<p>The authorization process revolves around the following constructs:</p>
<div class="variablelist">
<dl class="variablelist">
<dt>
<span class="term">
<em>Secured Resource</em>
</span>
</dt>
<dd>
A resource to which access is restricted. Indices, aliases, documents, fields,
users, and the Elasticsearch cluster itself are all examples of secured objects.
</dd>
<dt>
<span class="term">
<em>Privilege</em>
</span>
</dt>
<dd>
A named group of one or more actions that a user may execute against a
secured resource. Each secured resource has its own sets of available privileges.
For example, <code class="literal">read</code> is an index privilege that represents all actions that enable
reading the indexed/stored data. For a complete list of available privileges
see <a class="xref" href="security-privileges.html" title="Security privileges">Security privileges</a>.
</dd>
<dt>
<span class="term">
<em>Permissions</em>
</span>
</dt>
<dd>
<p>
A set of one or more privileges against a secured resource. Permissions can
easily be described in words, here are few examples:
</p>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<code class="literal">read</code> privilege on the <code class="literal">products</code> index
</li>
<li class="listitem">
<code class="literal">manage</code> privilege on the cluster
</li>
<li class="listitem">
<code class="literal">run_as</code> privilege on <code class="literal">john</code> user
</li>
<li class="listitem">
<code class="literal">read</code> privilege on documents that match query X
</li>
<li class="listitem">
<code class="literal">read</code> privilege on <code class="literal">credit_card</code> field
</li>
</ul>
</div>
</dd>
<dt>
<span class="term">
<em>Role</em>
</span>
</dt>
<dd>
A named set of permissions
</dd>
<dt>
<span class="term">
<em>User</em>
</span>
</dt>
<dd>
The authenticated user.
</dd>
<dt>
<span class="term">
<em>Group</em>
</span>
</dt>
<dd>
One or more groups to which a user belongs. Groups are not supported in some
realms, such as native, file, or PKI realms.
</dd>
</dl>
</div>
<p>A role has a unique name and identifies a set of permissions that translate to
privileges on resources. You can associate a user or group with an arbitrary
number of roles. When you map roles to groups, the roles of a user in that group
are the combination of the roles assigned to that group and the roles assigned
to that user. Likewise, the total set of permissions that a user has is defined
by the union of the permissions in all its roles.</p>
<p>The method for assigning roles to users varies depending on which realms you use
to authenticate users. For more information, see <a class="xref" href="mapping-roles.html" title="Mapping users and groups to roles">Mapping users and groups to roles</a>.</p>
<h3>
<a id="attributes"></a>Attribute-based access control<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/x-pack/docs/en/security/authorization/overview.asciidoc">edit</a>
</h3>
<p>The security features also provide an attribute-based access control (ABAC)
mechanism, which enables you to use attributes to restrict access to documents
in search queries and aggregations. For example, you can assign attributes to
users and documents, then implement an access policy in a role definition. Users
with that role can read a specific document only if they have all the required
attributes.</p>
<p>For more information, see
<a href="https://www.elastic.co/blog/attribute-based-access-control-with-xpack" class="ulink" target="_top">Document-level attribute-based access control with X-Pack 6.1</a>.</p>











</div>
<div class="navfooter">
<span class="prev">
<a href="oidc-without-kibana.html">« OpenID Connect without Kibana</a>
</span>
<span class="next">
<a href="built-in-roles.html">Built-in roles »</a>
</span>
</div>
</div>

                  <!-- end body -->
                        </div>
                        <div class="col-xs-12 col-sm-4 col-md-4" id="right_col">
                        
                        </div>
                    </div>
                </div>
            </section>
        </div>
    </section>
</div>
<script src="../static/cn.js"></script>
</body>
</html>